Skip to content

Instantly share code, notes, and snippets.

@ZenGround0
ZenGround0 / OPP.md
Created May 22, 2024 01:57
Onramp Protocol Prototype

Summary

The FVM brings smart contracts to filecoin allowing developers to do productive novel things with verifiable data. One obvious thing to do is allow clients to put data on filecoin more easily. Enabling onboarding small pieces is better for users but worse for scale which motivates bridging to higher throughput lower latency lower cost systems like blockchain L2s. Some redesigning of the standard client contract flow is needed for things to work on L2s. Essentially the contract should be split into two halves: an expensive contract onboarding, aggregating and paying for data and an efficient contract transmitting proof of data storage.

FilOz is building a prototype of this here: https://github.com/ZenGround0/onramp-contracts/tree/main so that developers can build applications more easily following this design.

We're currently prototyping. First getting it working with L1 and L2 == Filecoin, then getting it working with true bridging on calibration net. Once we're done we'll measure performance

@BramYeh
BramYeh / ViewPagerBottomSheetBehavior.java
Last active May 22, 2024 02:59
ViewPagerBottomSheetBehavior overrides package level methods and fields
package android.support.design.widget;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.ViewGroup;
import java.lang.ref.WeakReference;
/**
@cobyism
cobyism / gh-pages-deploy.md
Last active May 22, 2024 02:55
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@arjunv
arjunv / keyevents.json
Created December 2, 2018 00:01
All Android Key Events for usage with adb shell
{
"key_events": {
"key_unknown": "adb shell input keyevent 0",
"key_soft_left": "adb shell input keyevent 1",
"key_soft_right": "adb shell input keyevent 2",
"key_home": "adb shell input keyevent 3",
"key_back": "adb shell input keyevent 4",
"key_call": "adb shell input keyevent 5",
"key_endcall": "adb shell input keyevent 6",
"key_0": "adb shell input keyevent 7",
@abir-taheer
abir-taheer / instagram-follower-following.js
Last active May 22, 2024 02:51
"This is our community, this is our family, these are our friends." https://www.youtube.com/watch?v=gk7iWgCk14U&t=425s
if (window.location.origin !== "https://www.instagram.com") {
window.alert(
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.",
);
window.location.href = "https://www.instagram.com";
console.clear();
}
const fetchOptions = {
credentials: "include",
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active May 22, 2024 02:50 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@ScriptAutomate
ScriptAutomate / S3NakedInPublic.sh
Created October 26, 2018 22:23
[Bash Script / awscli / AWS] List all S3 buckets, in the default region config, that have 'Public' permissions listed anywhere in the ACL
#!/usr/bin/env bash
# Requires awcli
# pip install awscli --user --upgrade
# https://docs.aws.amazon.com/cli/latest/userguide/installing.html
BUCKETS=`aws s3api list-buckets --query 'Buckets[*].Name' --output text | tr " " "\n"`
for BUCKET in $BUCKETS
do
OH_NOES=`aws s3api get-bucket-acl --bucket $BUCKET | grep -e 'URI.*http\:\/\/acs\.amazonaws\.com\/groups\/global\/AllUsers\"'`
if [ ! -z "$OH_NOES" ]
@ScriptAutomate
ScriptAutomate / vpn-cloudformation-template.yaml
Last active May 22, 2024 02:50 — forked from pbzona/vpn-cloudformation-template.yaml
Roll your own Amazon Linux 2 OpenVPN with AWS CloudFormation (w/ Dynamically Discovered Latest AMI Id via Parameter Store)
# Personal OpenVPN Server Deployment
# Updates applied by Derek Ardolf / @ScriptAutomate / https://icanteven.io
# 11/08/2019 - Version 2.x:
# - Released with many updates, and tracked here: https://github.com/ScriptAutomate/openvpn-cfn
#
# Created by John Creecy / @zugdug
# 10/30/2017 - Version 1.0:
# - Original: https://gist.github.com/zugdud/b39eea02faa6926305f57fbde8d31b68
# Original Linux Academy blog series walkthrough on building the old OpenVPN template:
# - Part 1: https://linuxacademy.com/blog/tutorials/roll-vpn-aws-cloudformation-part-one/
@ScriptAutomate
ScriptAutomate / Install-WSLAndUbuntu.ps1
Last active May 22, 2024 02:49
Enable WSL and Install Ubuntu 22.04 (or 20.04)
<#
- BIOS of host machine also needs to be configured to allow hardware virtualization
- Windows 10 Pro or otherwise is needed; Windows 10 Home Edition CANNOT get WSL
- This gist WSLv2, but can use WSLv1 instead. I needed v1 as I run Windows 10 in a VM in Virtualbox.
- WSLv2 has been giving me problems in Virtualbox 6.1, but WSLv1 works properly.
- vbox has issues with the GUI settings when it comes to nested virtualization on certain systems,
so run the following if needing to give a VM this enabled setting:
VBoxManage modifyvm <vm-name> --nested-hw-virt on
#>
@ScriptAutomate
ScriptAutomate / gh-delete-auditor.sh
Last active May 22, 2024 02:49
Provided a PR that is deleting files from a project, checks all other open PRs to see what PRs may be impacted
#!/usr/bin/env bash
# Wraps around GitHub CLI (gh): https://cli.github.com/
# Check all other open PRs that are working on
# files being deleted by the target PR.
# Usage:
# ./gh-delete-auditor.sh <PR>
#
# Example:
# ./gh-delete-auditor.sh 57645